@charset "utf-8";
/*!
 * Mixins
 */

@mixin setTopLine($c: #dfdfdf) {
    position: relative;
	&:before{
	  content: " ";
	  position: absolute;
	  left: 0;
	  top: 0;
	  width: 100%;
	  height: 100%;
		@each $prefix in '-webkit-', '-moz-' {
			#{$prefix}box-sizing: border-box;
		}
	  border-top: 1px solid $c;
	  color: $c;
	  -webkit-transform-origin: 0 0;
			   transform-origin:  0 0;
	  -webkit-transform: scaleY(0.5);
			   transform: scaleY(0.5);
	}

}

@mixin setBottomLine($c: #dfdfdf) {
  content: " ";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 1px;
  border-bottom: 1px solid $c;
  color: $c;
  -webkit-transform-origin: 0 100%;
            transform-origin: 0 100%;
  -webkit-transform: scaleY(0.5);
           transform: scaleY(0.5);
}

@mixin setLeftLine($c: #dfdfdf) {
  content: " ";
  position: absolute;
  left: 0;
  top: 0;
  width: 1px;
  height: 100%;
  border-left: 1px solid $c;
  color: $c;
  -webkit-transform-origin: 0 0;
          transform-origin:  0 0;
  -webkit-transform: scaleX(0.5);
           transform: scaleX(0.5);
}

@mixin setRightLine($c: #dfdfdf) {
  content: " ";
  position: absolute;
  right: 0;
  top: 0;
  width: 1px;
  height: 100%;
  border-right: 1px solid $c;
  color: $c;
  -webkit-transform-origin: 100% 0;
            transform-origin: 100% 0;
  -webkit-transform: scaleX(0.5);
            transform: scaleX(0.5);
}


@mixin one-pixel-border(){
	position: relative;
	&:before {
		content: "";
		position: absolute;
		width: 200%;
		height: 200%;
		@if $ps == top {
			border-top: 1px solid $bc;
		} @else if $ps == right {
			border-right: 1px solid $bc;
		} @else if $ps == bottom {
			border-bottom: 1px solid $bc;
		} @else if $ps == left {
			border-left: 1px solid $bc;
		} @else {
			border: 1px solid $bc;
		}
		
		@each $prefix in '-webkit-', '-moz-', '-ms-', '-o-', '' {
			#{$prefix}transform-origin: 0 0;
		}
		@each $prefix in '-webkit-', '-ms-', '-o-', '' {
			#{$prefix}transform: scale(0.5, 0.5);
		}
		@each $prefix in '-webkit-', '-moz-', '' {
			#{$prefix}box-sizing: border-box;
		}		
	}
}

@mixin one-pixel-border($bc,$ps){
	position: relative;
	&:before {
		content: "";
		position: absolute;
		width: 200%;
		height: 200%;
		@each $prefix in '-webkit-', '-moz-', '-ms-', '-o-', '' {
			#{$prefix}transform-origin: 0 0;
		}

		@each $prefix in '-webkit-', '-moz-', '' {
			#{$prefix}box-sizing: border-box;
		}
		border-color:#{$bc};
		border-style:solid;
		border-width:0;

		@if $ps == top {
			border-top-width:1px;
		} @else if $ps == right {
			border-right-width:1px;
		} @else if $ps == bottom {
			border-bottom-width:1px;
		} @else if $ps == left {
			border-left-width: 1px;
		} @else {
			border-width: 1px;
		}		
	}
}

@mixin one-border($bc: #dfdfdf){
   @include one-pixel-border(#{$bc},all);
}

@mixin one-border-top($bc: #dfdfdf){
   @include one-pixel-border(#{$bc},top);
}

@mixin one-border-right($bc: #dfdfdf){
   @include one-pixel-border(#{$bc},right);
}

@mixin one-border-bottom($bc: #dfdfdf){
   @include one-pixel-border(#{$bc},bottom);
}

@mixin one-border-left($bc: #dfdfdf){
   @include one-pixel-border(#{$bc},left);
}